import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/orderList',
                    component: () => import(/* webpackChunkName: "orderList" */ '../components/page/order/orderList.vue'),
                    meta: { title: '订单列表' }
                },
                {
                    path: '/goodsList',
                    component: () => import('../components/page/goods/goodsList.vue'),
                    meta: { title: '商品列表' }
                },
                {
                    path: '/goodsCate',
                    component: () => import('../components/page/goodsCate/index.vue'),
                    meta: { title: '商品分类' }
                },
                {

                    path: '/test',
                    component: () => import('../components/page/test.vue'),
                    meta: { title: '测试页面' }
                },
                {
                    path: '/userList',
                    component: () => import('../components/page/user/userList.vue'),
                    meta: { title: '普通用户列表' }
                },
                {
                    path: '/authorization',
                    component: () => import('../components/page/authorization/authorization.vue'),
                    meta: { title: '权限管理' }
                },
                {
                    path: '/role',
                    component: () => import('../components/page/authorization/role.vue'),
                    meta: { title: '角色管理' }
                }, 
                {
                    path: '/logsRequestAllList',
                    component: () => import('../components/page/log/logsRequestAllList.vue'),
                    meta: { title: '接口访问日志' }

                },
                {
                    path: '/advertising',
                    component: () => import('../components/page/advertising/advertising.vue'),
                    meta: { title: '广告列表' }

                },
                {
                    path: '/message',
                    component: () => import('../components/page/message/message.vue'),
                    meta: { title: '消息列表' }
                },
                {
                    path: '/coupon',
                    component: () => import('../components/page/coupon/coupon.vue'),
                    meta: { title: '优惠券列表' }
                },
                {
                    path: '/orderSubscribe',
                    component: () => import('../components/page/order/orderSubscribe.vue'),
                    meta: { title: '预约列表' }
                },
                {
                    path: '/agent',
                    component: () => import('../components/page/agent/agent.vue'),
                    meta: { title: '代理列表' }
                },
                {
                    path: '/withdrawal',
                    component: () => import('../components/page/user/withdrawal.vue'),
                    meta: { title: '提现列表' }
                },{
                    path:'teahouseList',
                    component:()=>import('../components/page/teahouseManagement/teahouseList.vue'),
                    meta:{title:'茶楼管理'}
                },{
                    path: '/floorList',
                    component: () => import('../components/page/teahouseManagement/floorList.vue'),
                    meta: { title: '查询楼层' }
                },
                {
                    path: '/reserveList',
                    component: () => import('../components/page/reserve/reserveList.vue'),
                    meta: { title: '预约列表' }
                },
            ]
        },
        {
            path: '/goodsPriceAdd',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/goods/goodsPriceAdd.vue'),
            meta: { title: '商品规格详情' }
        },
        {
            path: '/goodsAdd',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/goods/goodsAdd.vue'),
            meta: { title: '商品增加' }
        },
        {
            path: '/goodsUpdate',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/goods/goodsUpdate.vue'),
            meta: { title: '商品详情' }
        },
        {
            path: '/goodsCategoryUpdate',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/goodsCate/goodsCategoryUpdate.vue'),
            meta: { title: '编辑' }
        },

        {
            path: '/userUpdate',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/user/userUpdate.vue'),
            meta: { title: '用户编辑' }
        },

        {
            path: '/goodsCategoryAdd',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/goodsCate/goodsCategoryAdd.vue'),
            meta: { title: '增加' }
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/teahouseUpdate',
            component: () => import('../components/page/teahouseManagement/teahouseUpdate.vue'),
            meta: { title: '修改茶楼' }
        },
        {
            path: '/houseAdd',
            component: () => import('../components/page/teahouseManagement/houseAdd.vue'),
            meta: { title: '新增房间' }
        },
        {
            path: '/houseUpdate',
            component: () => import('../components/page/teahouseManagement/houseUpdate.vue'),
            meta: { title: '修改房间信息' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
